<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../0_assets/js/mustache.min.js"></script>
</head>
<body>
    <script>
                let arr = [{
                name: 'mikaisa1',
                age: 18,
                sex: '男'
            },
            {
                name: 'mikaisa2',
                age: 19,
                sex: '男'
            },
            {
                name: 'mikaisa3',
                age: 20,
                sex: '男'
            },
        ];

        let data = {
            arr
        };

        let templateStr = `
            {{#arr}}
                <li>
                    <h3>姓名: {{name}}</h3>
                    <div>年龄: {{age}}</div>
                    <div>性别: {{sex}}</div>
                </li>
            {{/arr}}   
        `;

        // 本节对于源码进行了修改，主要是在paserTemplate方法的最后return部分进行了打印，看看tokens到底是个什么东西；
        mustache.render(templateStr,data);
    </script>
</body>
</html>